package com.jml.oom;


/**
 * @author:jml
 * @date: 2019/5/8 18:31
 * @description：
 */
public class UnableCreateNativeThread {

    public static void main(String[] args) {
        for (int i = 0; i <Integer.MAX_VALUE ; i++) {
            new Thread(() -> {
                try {
                    Thread.sleep(Integer.MAX_VALUE);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }).start();
            System.out.println(i);
        }

    }
}
